<?php require '../public/system/headers/headers.php';?>
<?php echo $this->headLink()->appendStylesheet($this->websiteUrl . 'system/css/seotoaster.css'); ?>
<?php echo $this->headLink()->appendStylesheet($this->websiteUrl . 'system/js/thickbox/thickbox.css'); ?>

<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/jquery/jquery.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/thickbox/thickbox.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/system.js'); ?>
<?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/things/things.js'); ?>
<?php echo $this->headScript(); ?>
<div id="seotoaster" class="removethings">
<div class="admineditwhat">{%Remove Things%}</div>
<div class="close_window" onclick="parent.tb_remove();"></div>
<form method="post" action="<?php echo $this->websiteUrl; ?>sys/backend_things/removethings/">
<!-- message -->
<?php if($this->messageImages != '' || $this->messageFiles != '' || $this->messageVideos != ''): ?>
<div class="success" onclick="this.style.display='none';">    
    <?php if($this->messageImages != ''): ?>
        <p align="left"><b>Images</b></p><hr noshade="noshade" size="1" style="color:#fff;"/>
        <?php echo $this->messageImages; ?>
    <?php endif; ?>
    <?php if($this->messageFiles != ''): ?>
        <p align="left"><b>Files</b></p><hr noshade="noshade" size="1" style="color:#fff;"/>
        <?php echo $this->messageFiles; ?>
    <?php endif; ?>
    <?php if($this->messageVideos != ''): ?>
        <p align="left"><b>Videos</b></p><hr noshade="noshade" size="1" style="color:#fff;"/>
        <?php echo $this->messageVideos; ?>
    <?php endif; ?>
</div>
<?php endif; ?>
<!-- end message -->
<!-- images -->
<div id="admindeleteimgheader">{%Images%} 
<!-- list folders -->
<select name="adminuploadselectfolder" id="removethings_selectfolder" onchange="loadImagesForRemoveThings('<?php echo $this->websiteUrl; ?>', this.value);">

	<?php if($this->selectFolder == ''): ?><option value="" selected="selected">select folder</option><?php endif; ?>
	<?php if(!empty($this->listFolders) && is_array($this->listFolders)): ?>
        <?php foreach($this->listFolders as $folderName): ?>
            <?php if($folderName == $this->selectFolder): ?>
                <option value="<?php echo $folderName; ?>" selected="selected"><?php echo $folderName; ?></option>
            <?php else: ?>
                <option value="<?php echo $folderName; ?>"><?php echo $folderName; ?></option>
            <?php endif; ?>
        <?php endforeach; ?>
	<?php endif; ?>
</select>
&nbsp;&nbsp;&nbsp;<input style="vertical-align:middle;" type="checkbox" name="selectAllImages" id="selectAllImages" onclick="checkAllPictures();" /> <span class="checkAllRemove">{%Check All?%}</span>
<!-- end list folders -->
</div>
<div id="removethings_images">
<?php if($this->selectFolder != ''): ?>
<?php if(!empty($this->images) && is_array($this->images)): ?>
        <?php foreach ($this->images as $image): ?>
        <div align="center" id="removethings_one_image">
        <img alt="<?php echo Default_View_Helper_ToolsHelper::cropType($image); ?>" title="<?php echo $image; ?>" border="0" width="65" src="<?php echo $this->websiteUrl . 'images/' . $this->selectFolder . '/' . 'small/' . $image; ?>">
        <input type="checkbox" name="images[<?php echo $image; ?>]" />
        </div>
        <?php endforeach; ?>
    <?php endif; ?>
    
    <?php if(!empty($this->listVideoFiles) && is_array($this->listVideoFiles)): ?>
        <div style="clear:both;margin:5px auto 5px auto;text-align:center;background-color:#eee;">Videos</div>
        <?php foreach ($this->listVideoFiles as $videoFile): ?>
            <div align="center" style="height:100px;" id="removethings_one_image">
            <img alt="<?php echo Default_View_Helper_ToolsHelper::cropType($videoFile); ?>" title="<?php echo $videoFile; ?>" border="0" width="65" src="<?php echo $this->websiteUrl; ?>system/images/ico_video.gif">
            <span style="font-size:9px;font-weight: normal;"><?php echo $videoFile; ?></span><input type="checkbox" name="videos[<?php echo $videoFile; ?>]" />
            </div>
        <?php endforeach; ?>
    <?php endif; ?>    
<?php endif; ?>
</div>
<!-- end images -->
<!-- files -->
<div id="admindeletefileheader">{%Files%} &nbsp;&nbsp;&nbsp;<input style="vertical-align:middle;" type="checkbox" name="selectAllFiles" id="selectAllFiles" onclick="checkAllFiles();" /> <span class="checkAllRemove">{%Check All?%}</span></div>
<div id="removethings_files">
   <?php if(!empty($this->downloadFiles) && is_array($this->downloadFiles )): ?>
         <?php foreach ($this->downloadFiles as $fileName): ?>
            <p title="<?php echo Default_View_Helper_ToolsHelper::cropType($fileName); ?>">
            <input type="checkbox" name="files[<?php echo $fileName; ?>]">&nbsp;<?php echo $fileName; ?></p>
        <?php endforeach; ?>
    <?php endif; ?>
</div>
<!-- end files -->
	<input name="editcsssubmit" type="submit" value="{%REMOVE%}" class="formsubmit" id="editcsssubmit"/>
	<input type="hidden" id="hid-main-wsurl" name="hid-main-wsurl" value="<?php echo $this->websiteUrl; ?>" />
</form>
</div>